package com.wiloon.java8x.basic;

public class YiWei {
    public static void main(String[] args) {
        System.out.println(Long.valueOf("FFFFFFFF", 16));
    }

    private static void test0() {
        int number = 256;
        printInfo(number);
        number = number >> 8;
        printInfo(number);
    }

    /**
     * 输出一个int的二进制数
     *
     * @param num
     */
    private static void printInfo(int num) {
        System.out.println(Integer.toBinaryString(num));
    }

    private static void test() {
        int number = 255;
        //原始数二进制
        printInfo(number);
        number = number << 1;
        //左移一位
        printInfo(number);
        number = number >> 1;
        //右移一位
        printInfo(number);
    }
}
